class Solution
{
public:
    bool hostschedule(vector<vector<int> >& schedule)
    {
        sort(schedule.begin(), schedule.end());
        int i = 0;
        while (i < schedule.size() - 1)
        {
            if (schedule[i][1] > schedule[i + 1][0])
                return false;
            i++;
        }

        return true;
    }
};